package com.hmall.clients;

import com.hmall.common.dto.PageDTO;

import com.hmall.pojo.Item;
import com.hmall.pojo.ItemDoc;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("itemservice")
public interface ItemClient {
    @GetMapping("/item/{id}")
    Item queryItemById(@PathVariable("id") Long id);

    @GetMapping("/item/list")
    PageDTO<Item> queryPage(@RequestParam Integer page, @RequestParam Integer size);

}
